package com.jiantong.user.model;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by ThinkPad on 2017/8/8.
 */

public class SysModules {

    @Getter
    @Setter
    private Long id;
    /**
     * 模块名字
     */
    @Getter
    @Setter
    private String name;
    /**
     * 模块类型
     */
    @Getter
    @Setter
    private Integer type;
    /**
     * 模块编码
     */
    @Getter
    @Setter
    private String code;
    /**
     * 模块地址
     */
    @Getter
    @Setter
    private String url;
    /**
     * 模块排名
     */
    @Getter
    @Setter
    private String order;
    /**
     * 模块详情
     */
    @Getter
    @Setter
    private String infomation;
    /**
     * 模块父级id
     */
    @Getter
    @Setter
    private Long parentId;
    @Getter
    @Setter
    private Date createdAt;
    @Getter
    @Setter
    private Date updatedAt;
    /**
     * 下一级模块集合
     */
    @Setter
    private List<SysModules> childSysModules;


    public   List <SysModules> getChildSysModules(){

      if (childSysModules==null){
          return new ArrayList<SysModules>();
      }else{
          return childSysModules;
      }
  }
}
